﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Windows.Media.Imaging;

namespace Linxiao.SP.Tools.GroupUsersMover
{
    public enum TreeViewNodeType
    {
        Root = 0,
        Group = 1,
        User = 2
    }

    /// <summary>
    /// Item source for TreeViewItem
    /// </summary>
    public class TreeViewNode
    {
        private readonly ICollection<TreeViewNode> _children = new ObservableCollection<TreeViewNode>(); 

        public string Name { get; set; }
        public string LoginName { get; set; } 
        public TreeViewNodeType Type {get; set;}
        public BitmapImage Icon { get; set; }
        public string ParentGroup { get; set; }
                
        public ICollection<TreeViewNode> Children 
        {
            get 
            { 
                return _children; 
            } 
        }  
    }
}
